<script id="sideNav" type="text/html">
  {{#  layui.each(d, function(index, item){ }}
  <li class="layui-nav-item">
      <a href="{{item.url}}" target="{{item.target}}">
          <i class="layui-icon {{item.icon}}"></i>&emsp;<cite>{{ item.name }}</cite>
      </a>
      {{# if(item.subMenus&&item.subMenus.length>0){ getSubMenus(item.subMenus); } }}
  </li>
  {{#  }); }}
  {{# function getSubMenus(subMenus){ }}
  <dl class="layui-nav-child">
      {{# layui.each(subMenus, function(index, subItem){ }}
      <dd>
          <a href="{{ subItem.url }}" target="{{subItem.target}}">
              {{# if(subItem.icon){ }}
              <i class="layui-icon {{subItem.icon}}"></i>&emsp;
              {{# } }}
              {{ subItem.name }}
          </a>
          {{# if(subItem.subMenus&&subItem.subMenus.length>0){ getSubMenus(subItem.subMenus); } }}
      </dd>
      {{# }); }}
  </dl>
  {{# } }}
</script>
